<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台（PHP版）
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码，建议反馈是我们前进的动力
// | 开源版本可自由商用，可去除界面版权logo
// | gitee下载：https://gitee.com/likeshop_gitee/likeadmin
// | github下载：https://github.com/likeshop-github/likeadmin
// | 访问官网：https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------

namespace app\adminapi\validate\order;


use app\common\validate\BaseValidate;


/**
 * Order验证器
 * Class OrderValidate
 * @package app\adminapi\validate
 */
class OrderValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'app_id' => 'require',
        'user_id' => 'require',
        'admin_id' => 'require',
        'sn' => 'require',
        'out_trade_no' => 'require',
        'transaction_id' => 'require',
        'status' => 'require',
        'type' => 'require',
        'source' => 'require',
        'money' => 'require',
        'k_coin' => 'require',
        'z_coin' => 'require',
        'paytype' => 'require',
        'skits_id' => 'require',
        'skits_name' => 'require',
        'episodes_id' => 'require',
        'episodes_name' => 'require',
        'client_ip' => 'require',
        'template_id' => 'require',
        'template_item_id' => 'require',
        'activity_id' => 'require',
        'pay_time' => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'app_id' => '应用ID',
        'user_id' => '用户ID',
        'admin_id' => '管理员ID',
        'sn' => '用户SN',
        'out_trade_no' => '订单号',
        'transaction_id' => '交易单号',
        'status' => '数据状态 0:待支付 1:已支付 2:已取消 ',
        'type' => '订单类型1普通 2vip 3周卡 4月卡 5季卡 6年卡 7活动',
        'source' => '来源 0自然流量 1抖音2微信',
        'money' => '充值金额',
        'k_coin' => '充值K币',
        'z_coin' => '赠币',
        'paytype' => '支付方式 1-微信支付 2-支付宝支付',
        'skits_id' => '短剧ID',
        'skits_name' => '短剧名称',
        'episodes_id' => '剧集ID',
        'episodes_name' => '剧集名称',
        'client_ip' => '支付IP',
        'template_id' => '充值模板ID',
        'template_item_id' => '充值模板详情ID',
        'activity_id' => '活动ID',
        'pay_time' => '支付时间',
    ];


    /**
     * @notes 添加场景
     * @return OrderValidate
     * @author likeadmin
     * @date 2024/07/13 15:05
     */
    public function sceneAdd()
    {
        return $this->only(['app_id','user_id','admin_id','sn','out_trade_no','transaction_id','status','type','source','money','k_coin','z_coin','paytype','skits_id','skits_name','episodes_id','episodes_name','client_ip','template_id','template_item_id','activity_id','pay_time']);
    }


    /**
     * @notes 编辑场景
     * @return OrderValidate
     * @author likeadmin
     * @date 2024/07/13 15:05
     */
    public function sceneEdit()
    {
        return $this->only(['id','app_id','user_id','admin_id','sn','out_trade_no','transaction_id','status','type','source','money','k_coin','z_coin','paytype','skits_id','skits_name','episodes_id','episodes_name','client_ip','template_id','template_item_id','activity_id','pay_time']);
    }


    /**
     * @notes 删除场景
     * @return OrderValidate
     * @author likeadmin
     * @date 2024/07/13 15:05
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return OrderValidate
     * @author likeadmin
     * @date 2024/07/13 15:05
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}